package com.qfedu.common.core.enums;

/**
 * @Classname ExpireTypeEnum
 * @Description TODO
 * @Date 2025-09-25 10:11
 * @Created by 老任与码
 */
public enum ExpireTypeEnum {

    EXPIRE_TEMPLATE(1, "根据模版时间过期"),
    EXPIRE_DAYS(2, "根据领取时间和天数过期");

    private int type;
    private String desc;

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    ExpireTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ExpireTypeEnum getExpireTypeEnum(int type) {
        ExpireTypeEnum[] values = ExpireTypeEnum.values();
        for (ExpireTypeEnum value : values) {
            if (value.getType() == type) {
                return value;
            }
        }
        return null;
    }
}
